package  
{
	import flash.display.Sprite;
	/**
	 * ...
	 * @author Joseph Waters
	 */
	public class Stars extends Sprite
	{
		private var sRadius:int = 1; // Radius of the star
		private var sColor:uint = 0xFFFFFF;
		private var stageX:int = 1000;
		private var stageY:int = 1000;
		
		public function Stars(numStars:int) 
		{			
			// Initialize internal variables
			this.x = 0;
			this.y = 0;
			
			// Create the field of stars
			for (var i:int = 0; i < numStars; i++) {
				var starSprite:Sprite = new Sprite();
				
				starSprite.x = Math.round(Math.random() * this.stageX); // Random x placement of new star
				starSprite.y = Math.round(Math.random() * this.stageY); // Random y placement of new star
				starSprite.graphics.beginFill(sColor); // Start fill
				starSprite.graphics.drawCircle(0, 0, sRadius); // Draw circle, using radius as defined
				starSprite.graphics.endFill(); // End fill
				
				this.addChild(starSprite);
			}
		}	
	}

}